package com.yqjr.risk.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.yqjr.risk.pojo.OtherNetLoanWeb;
import com.yqjr.risk.service.IOtherNetLoanWebService;

@Controller
@RequestMapping("/othernet")
public class OtherNetLoanWebController {
	@Resource
	private IOtherNetLoanWebService otherNetLoanWebService;
	
	@RequestMapping("/list")
	public String toIndex(HttpServletRequest request,Model model){
		String phone = request.getParameter("phone");
		String name = request.getParameter("name");
		System.out.println(name);
		Map<String,String> map = new HashMap<>();
		map.put("phone", phone);
		map.put("webName", name);
		
		List<OtherNetLoanWeb> list = this.otherNetLoanWebService.queryAll(map);
		model.addAttribute("list", list);
		System.out.println("test================================="+list.size());
		return "listOtherNet";
	}
}
